﻿using ConfExpert.Forms.Base;
using DevTeam;
using System;

namespace ConfExpert.Forms.Ithalat
{
    public partial class EklenecekDekontlar : XForm
    {
        public EklenecekDekontlar()
        {
            InitializeComponent();
        }

        private void EklenecekDekontlar_Load(object sender, EventArgs e)
        {
            gridView1.Init("GetUNS_ToAdd");
            gridView1.AddAutoIncrementalPK("ID");
            gridView1.MakeColumnInvisible("KarbelKod");
            gridView1.FormatAsNumber(2, "Tutar");
            gridView1.AddSummary("Tutar");
            gridView1.EnableNewRow();
            gridView1.EnableRowDelete();
            gridView1.BestFitColumns();

            btnKaydet.ItemClick += btnKaydet_ItemClick;
        }

        void btnKaydet_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            gridView1.Update("", "UNS_DEKONT_ROW_ToAdd");
            gridView1.RefreshDataSource("GetUNS_ToAdd");
            gridView1.BestFitColumns();
        }
    }
}
